<%--
$Id: book-new.jsp 24 2011-06-17 13:31:30Z feigme $
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<%@ taglib prefix="iary" uri="/WEB-INF/tld/pagination.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><fmt:message key="user.manager"/></title>
<link href="${ctx }/css/admin/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br/>

<form:form action="${ctx }/admin/book/create.do" method="post" commandName="bookCommand">
<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center" border="0">
	<tr>
		<th colspan="2"><fmt:message key="admin.book.create.form"/></th>
	</tr>
	<tr>
		<td class="usertablerow2" width="20%"><fmt:message key="book.index"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<select name="index">
				<option value=""><fmt:message key="common.please.select"/></option>
				<c:forEach items="${bookCommand.indexList}" var="varIndex">
				<c:choose>
					<c:when test="${varIndex == bookCommand.index}">
						<option selected="selected" value="${varIndex}">${varIndex}</option> 
					</c:when>
					<c:otherwise>
						<option value="${varIndex}">${varIndex}</option> 
					</c:otherwise>
				</c:choose>
				</c:forEach>
			</select>
			<span class="error">*</span>
			<form:errors path="index" cssClass="error"/>
		</td>
	</tr>
	<tr>
		<td class="usertablerow2"><fmt:message key="book.name"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<input type="text" name="name" value="<c:out value="${bookCommand.name }"/>"/>
			<span class="error">*</span>
			<form:errors path="name" cssClass="error"/>
		</td>
	</tr>
	<tr>
		<td class="usertablerow2"><fmt:message key="book.dir"/><fmt:message key="common.colon"/></td>
		<td class="usertablerow2">
			<input type="text" name="path" size="11" value="<c:out value="${bookCommand.path }"/>"/>
			<span class="error">*</span>
			<form:errors path="path" cssClass="error"/>
		</td>
	</tr>
	<tr>
		<td class="usertablerow2" colspan="2"><input type="submit" value="<fmt:message key="common.submit"/>"/></td>
	</tr>
</table>
</form:form>

<br/>
</body>
</html>